<template>
	<view class="page" :style="themeColor">
		<view class="flex benben-position-layout flex flex-wrap align-center evaluateFemale_flex_0"
			:style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx'}">
			<view class='flex flex-wrap align-center justify-between flex-sub evaluateFemale_fd0_0'>
				<view class='flex flex-wrap align-center' @tap.stop="handleJumpDiy" data-type="back" data-url="1">
					<text class='fu-iconfont2  evaluateFemale_fd0_0_c0_c0' @tap.stop="handleJumpDiy" data-type="back"
						data-url="1">&#xE794;</text>
				</view>
				<view class='flex flex-wrap align-stretch justify-center flex-sub'>
					<text class='evaluateFemale_fd0_0_c1_c0'>{{authInfos.user_nickname}}</text>
				</view>
				<view class='flex flex-wrap align-center evaluateFemale_fd0_0_c2'>
				</view>
			</view>

		</view>
		<view :style="{height: (88+StatusBarRpx)+'rpx'}"></view>
		<view class="loading_css" v-if="isShow">
			<u-loading size="36" color="#6A0002"></u-loading>
			<view class="loading_text">加载中</view>
		</view>
		
		<!---flex布局flex布局开始-->
		<view class="flex flex-direction flex-wrap align-stretch benben-flex-layout evaluateFemale_flex_1" v-else>
			<view class='flex flex-wrap align-center evaluateFemale_fd1_0'>
				<text class='evaluateFemale_fd1_0_c0' v-if="authInfos.sex == 1">他的相册</text>
				<text class='evaluateFemale_fd1_0_c0' v-else>她的相册</text>
			</view>
			<view class='align-center evaluateFemale_fd1_1' v-if="authInfos.images.length > 0">
				<view class='flex flex-wrap align-center evaluateFemale_fd1_1_c0' v-for="(v, k) in authInfos.images">
					<image class='evaluateFemale_fd1_1_c0_c0' mode="aspectFill" :src='v' @tap.stop="previewImage(k, authInfos.images)"></image>
				</view>
			</view>
			<view class='flex flex-direction flex-wrap align-stretch evaluateFemale_fd1_2'>
				<view class='flex flex-wrap align-center evaluateFemale_fd1_2_c0'>
					<text class='evaluateFemale_fd1_0_c0'>评价</text>
				</view>
				<block v-if="authInfos.sex == 2">
					<view class='flex flex-direction flex-wrap align-stretch'>
						<view class='flex flex-wrap align-center evaluateFemale_fd1_2_c1_c0'>
							<text class='evaluateFemale_fd1_2_c1_c0_c0'>颜值</text>
							<view class='flex flex-wrap align-center'>
								<template v-for="starNum in [1,2,3,4,5]">
									<image v-if="fd1_2_c1_c0_c1 >= starNum" :key="starNum" class='evaluateFemale_star1fd1_2_c1_c0_c1' mode="aspectFit" @tap="click1(starNum)"
										:src='STATIC_URL+"36.png"'></image>
									<image v-else :key="starNum" class='evaluateFemale_star1fd1_2_c1_c0_c1' mode="aspectFit" @tap="click1(starNum)"
										:src='STATIC_URL+"37.png"'></image>
								</template>
							</view>
						</view>
					</view>
					<view class='flex flex-wrap align-center evaluateFemale_fd1_2_c1_c0'>
						<text class='evaluateFemale_fd1_2_c1_c0_c0'>身材</text>
						<view class='flex flex-wrap align-center'>
							<template v-for="starNum in [1,2,3,4,5]">
								<image v-if="fd1_2_c2_c1 >= starNum" :key="starNum" class='evaluateFemale_star1fd1_2_c2_c1' @tap="click2(starNum)"
									mode="aspectFit" :src='STATIC_URL+"36.png"'></image>
								<image v-else :key="starNum" class='evaluateFemale_star1fd1_2_c1_c0_c1' mode="aspectFit" @tap="click2(starNum)"
									:src='STATIC_URL+"37.png"'></image>
							</template>
						</view>
					</view>
					<view class='flex flex-wrap align-center evaluateFemale_fd1_2_c1_c0'>
						<text class='evaluateFemale_fd1_2_c1_c0_c0'>有趣</text>
						<view class='flex flex-wrap align-center'>
							<template v-for="starNum in [1,2,3,4,5]">
								<image v-if="fd1_2_c3_c1 >= starNum" :key="starNum" class='evaluateFemale_star1fd1_2_c2_c1' @tap="click3(starNum)"
									mode="aspectFit" :src='STATIC_URL+"36.png"'></image>
								<image v-else :key="starNum" class='evaluateFemale_star1fd1_2_c1_c0_c1' mode="aspectFit" @tap="click3(starNum)"
									:src='STATIC_URL+"37.png"'></image>
							</template>
						</view>
					</view>
					<view class='flex flex-wrap align-center evaluateFemale_fd1_2_c1_c0'>
						<text class='evaluateFemale_fd1_2_c1_c0_c0'>耐心</text>
						<view class='flex flex-wrap align-center'>
							<template v-for="starNum in [1,2,3,4,5]">
								<image v-if="fd1_2_c4_c1 >= starNum" :key="starNum" class='evaluateFemale_star1fd1_2_c2_c1' @tap="click4(starNum)"
									mode="aspectFit" :src='STATIC_URL+"36.png"'></image>
								<image v-else :key="starNum" class='evaluateFemale_star1fd1_2_c1_c0_c1' mode="aspectFit" @tap="click4(starNum)"
									:src='STATIC_URL+"37.png"'></image>
							</template>
						</view>
					</view>
				</block>
				<block v-else>
					<view class='flex flex-wrap align-center evaluateFemale_fd1_2_c1_c0'>
						<text class='evaluateFemale_fd1_2_c1_c0_c0'>守时</text>
						<view class='flex flex-wrap align-center'>
							<template v-for="starNum in [1,2,3,4,5]">
								<image v-if="fd1_2_c5_c1 >= starNum" :key="starNum" class='evaluateFemale_star1fd1_2_c2_c1' @tap="click5(starNum)"
									mode="aspectFit" :src='STATIC_URL+"36.png"'></image>
								<image v-else :key="starNum" class='evaluateFemale_star1fd1_2_c1_c0_c1' mode="aspectFit" @tap="click5(starNum)"
									:src='STATIC_URL+"37.png"' ></image>
							</template>
						</view>
					</view>
					<view class='flex flex-wrap align-center evaluateFemale_fd1_2_c1_c0'>
						<text class='evaluateFemale_fd1_2_c1_c0_c0'>清洁</text>
						<view class='flex flex-wrap align-center'>
							<template v-for="starNum in [1,2,3,4,5]">
								<image v-if="fd1_2_c6_c1 >= starNum" :key="starNum" class='evaluateFemale_star1fd1_2_c2_c1' @tap="click6(starNum)"
									mode="aspectFit" :src='STATIC_URL+"36.png"'></image>
								<image v-else :key="starNum" class='evaluateFemale_star1fd1_2_c1_c0_c1' mode="aspectFit"  @tap="click6(starNum)"
									:src='STATIC_URL+"37.png"'></image>
							</template>
						</view>
					</view>
					<view class='flex flex-wrap align-center evaluateFemale_fd1_2_c1_c0'>
						<text class='evaluateFemale_fd1_2_c1_c0_c0'>素质</text>
						<view class='flex flex-wrap align-center'>
							<template v-for="starNum in [1,2,3,4,5]">
								<image v-if="fd1_2_c7_c1 >= starNum" :key="starNum" class='evaluateFemale_star1fd1_2_c2_c1' @tap="click7(starNum)"
									mode="aspectFit" :src='STATIC_URL+"36.png"'></image>
								<image v-else :key="starNum" class='evaluateFemale_star1fd1_2_c1_c0_c1' mode="aspectFit" @tap="click7(starNum)"
									:src='STATIC_URL+"37.png"'></image>
							</template>
						</view>
					</view>
				</block>
			</view>
		</view>

		<!---flex布局flex布局结束-->
		<view class="flex flex-direction flex-wrap align-center benben-position-layout flex evaluateFemale_flex_2">
			<button class='evaluateFemale_fd2_0' @tap.stop="submitEvaluate">确定</button>

		</view>
		<view :style="{height: '88rpx'}"></view>


	</view>
</template>
<script>
	export default {
		components: {},


		data() {
			return {
				"fd1_2_c1_c0_c1": 5,
				"fd1_2_c2_c1": 5,
				"fd1_2_c3_c1": 5,
				"fd1_2_c4_c1": 5,
				"fd1_2_c5_c1": 5,
				"fd1_2_c6_c1": 5,
				"fd1_2_c7_c1": 5,
				"id": "",  // 被评价人id
				"isShow": true,
				"authInfos": {
					"images": [],
				},
				"type": 1, // 1对女的评价  2对男的评价
			};
		},
		computed: {
			themeColor() {
				return this.$store.getters.themeColor
			},

		},
		watch: {},
		onLoad(options) {
			let {
				id
			} = options
			if (id !== undefined) this.id = id
			this.getAuthInfo();
		},
		onUnload() {

		},
		onReady() {

		},
		onShow() {

		},
		onHide() {

		},
		onResize() {

		},
		onPullDownRefresh() {

		},
		onReachBottom(e) {

		},
		onPageScroll(e) {

		},
		methods: {
			//获取对方人用户详情
			getAuthInfo() {
				this.$api.post(global.API_VERSION + '/64366f0e3b620', {
					user_id: this.id
				}).then(res => {
					this.isShow = false;
					if (res.data.code == 1) {
						this.authInfos = res.data.data;
						if (this.authInfos.sex == 1) {
							this.type = 2;
						} else {
							this.type = 1;
						}
					} else {
						this.$message.info(res.data.msg);
					}
				})
			},
			// 颜值
			click1(e) {
				this.fd1_2_c1_c0_c1 = e;
			},
			// 身材
			click2(e) {
				this.fd1_2_c2_c1 = e;
			},
			// 有趣
			click3(e) {
				this.fd1_2_c3_c1 = e;
			},
			// 耐心
			click4(e) {
				this.fd1_2_c4_c1 = e;
			},
			// 守时
			click5(e) {
				this.fd1_2_c5_c1 = e;
			},
			// 清洁
			click6(e) {
				this.fd1_2_c6_c1 = e;
			},
			// 素质
			click7(e) {
				this.fd1_2_c7_c1 = e;
			},
			// 提交评价
			submitEvaluate() {
				this.$api.post(global.API_VERSION + '/6476ef49b4cac', {
					type: this.type,
					other_id: this.id,
					face_stars: this.type == 2 ? 0 : this.fd1_2_c1_c0_c1,
					figure_stars: this.type == 2 ? 0 : this.fd1_2_c2_c1,
					zest_stars: this.type == 2 ? 0 : this.fd1_2_c3_c1,
					patience_stars: this.type == 2 ? 0 : this.fd1_2_c4_c1,
					punctuality_stars: this.type == 1 ? 0 : this.fd1_2_c5_c1,
					clean_stars: this.type == 1 ? 0 : this.fd1_2_c6_c1,
					quality_stars: this.type == 1 ? 0 : this.fd1_2_c7_c1,
				}).then(res => {
					this.$message.info(res.data.msg);
					if (res.data.code == 1) {
						setTimeout(() => {
							uni.navigateBack();
						}, 800)
					}
				})
			},
			
			// 图片预览
			previewImage(index, val) {
				let photoList = val;
				uni.previewImage({
					current: index,
					urls: photoList
				})
			},
		}
	};
</script>
<style lang="scss" scoped>
	.page {
		width: 100vw;
		overflow-x: hidden;
		min-height: calc(100vh - var(--window-bottom));
		background: var(--benbenbgColor0);
		background-size: 100% auto !important;
	}

	.evaluateFemale_flex_0 {
		border-bottom: 1px solid #eee;
		background: #fff;
		width: 750rpx;
		height: 88rpx;
		overflow: hidden;
		z-index: 10;
		top: 0rpx;
		background-size: 100% auto !important;
	}

	.evaluateFemale_fd0_0_c2 {
		width: 32rpx;
		height: 32rpx;
	}

	.evaluateFemale_fd0_0_c1_c0 {
		font-size: 36rpx;
		font-weight: 500;
		color: #333;
		line-height: 88rpx;
	}

	.evaluateFemale_fd0_0_c0_c0 {
		font-size: 32rpx;
		font-weight: 500;
		color: #333;
		line-height: 88rpx;
	}

	.evaluateFemale_fd0_0 {
		margin: 0rpx 32rpx 0rpx 32rpx;
	}

	.evaluateFemale_flex_1 {
		padding: 32rpx 0rpx 32rpx 0rpx;
	}

	.evaluateFemale_star1fd1_2_c2_c1 {
		width: 32rpx;
		height: 32rpx;
		border-radius: 0rpx 0rpx 0rpx 0rpx;
		margin: 0rpx 5rpx 0rpx 5rpx;
	}

	.evaluateFemale_star1fd1_2_c1_c0_c1 {
		height: 32rpx;
		margin: 0rpx 5rpx 0rpx 5rpx;
		width: 32rpx;
	}

	.evaluateFemale_star1fd1_2_c1_c0_c1 {
		width: 32rpx;
		height: 32rpx;
		border-radius: 0rpx 0rpx 0rpx 0rpx;
		margin: 0rpx 5rpx 0rpx 5rpx;
	}

	.evaluateFemale_fd1_2_c1_c0_c0 {
		margin: 0rpx 16rpx 0rpx 0rpx;
		color: #666666;
		font-size: 28rpx;
		font-weight: 400;
	}

	.evaluateFemale_fd1_2_c1_c0 {
		padding: 16rpx 0rpx 16rpx 0rpx;
	}

	.evaluateFemale_fd1_2_c0 {
		margin: 0rpx 0rpx 8rpx 0rpx;
	}

	.evaluateFemale_fd1_2 {
		padding: 0rpx 32rpx 0rpx 32rpx;
	}

	.evaluateFemale_fd1_1_c0_c0 {
		width: 160rpx;
		height: 160rpx;
		border-radius: 16rpx 16rpx 16rpx 16rpx;
	}

	.evaluateFemale_fd1_1_c0 {
		float: left;
		margin: 0rpx 8rpx 8rpx 8rpx;
		width: 160rpx;
		height: 160rpx;
		border-radius: 16rpx 16rpx 16rpx 16rpx;
	}

	.evaluateFemale_fd1_1 {
		border-bottom: 1px solid #eee;
		margin: 0rpx 23rpx 32rpx 23rpx;
		padding: 0rpx 0rpx 32rpx 0rpx;
		overflow: hidden;
	}

	.evaluateFemale_fd1_0_c0 {
		color: #333333;
		font-size: 32rpx;
		font-weight: 500;
	}

	.evaluateFemale_fd1_0 {
		margin: 0rpx 32rpx 24rpx 32rpx;
	}

	.evaluateFemale_flex_2 {
		width: 750rpx;
		height: 88rpx;
		overflow: hidden;
		z-index: 10;
		bottom: calc(48rpx + var(--window-bottom));
	}

	.evaluateFemale_fd2_0 {
		background: #6A0002;
		border-radius: 44rpx 44rpx 44rpx 44rpx;
		font-size: 32rpx;
		color: #fff;
		width: 638rpx;
		height: 88rpx;
		line-height: 88rpx;
	}
</style>